#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Time    : 2018/2/1 0001 15:48
# @Author  : Arliki
# @email   : hkdnxycz@outlook.com
# @File    : start

import os
import scrapy
from scrapy.crawler import CrawlerProcess
from scrapy.utils.project import get_project_settings


def run():
    os.environ.setdefault('SCRAPY_ETTINGS_MODULE', 'project.settings')
    process = CrawlerProcess(get_project_settings())
    process.crawl("movie_url")  # 电影url
    process.crawl("comment_url")  # 评论url
    # process.crawl("comment_url")    #评论url
    # process.crawl("comment_url")    #评论url
    # process.crawl("comment")        #评论
    # process.crawl("comment")        #评论
    # process.crawl("comment")        #评论
    # process.crawl("comment")        #评论
    process.crawl("comment")  # 评论
    for sp in process.spider_loader.list():
        # print(sp)
        process.crawl(sp)
    process.start()


if __name__ == '__main__':
    run()
